/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef MATERIAL_H
#define MATERIAL_H

#include <xml/Object.h>
#include <Color.h>

namespace liba
{
namespace lib3d
{
namespace material
{

class Material : public xml::ObjectANSI
{
public:
/*	enum BlendFunc
	{
		ZERO,
		ONE,
		SRC_COLOR,
		ONE_MINUS_SRC_COLOR,
		SRC_ALPHA,
		ONE_MINUS_SRC_ALPHA,
		DEST_ALPHA,
		ONE_MINUS_DEST_ALPHA,
		DEST_COLOR,
		ONE_MINUS_DEST_COLOR,
		SRC_ALPHA_SAT
	};
	static converter::EnumPair<char,BlendFunc> BlendFuncNames[];
*/
	Color diffuse;
	Color emissive;
	Color specular;
	double specular_power;
	double transparency;
	Color reflection;
///	double reflectivity;
///	bool double_sided;

///	BlendFunc source_blend;
///	BlendFunc dest_blend;

	Material();
protected:
	virtual bool on_attribute(xml::Provider * prov, const std::string & name, const std::string & value );
	virtual void on_save_attributes( xml::SaverBase * saver )const;
};

} // namespace material
} // namespace lib3d

/*
namespace converter
{

template<>
struct ConverterTraits<char, lib3d::material::Material::BlendFunc>
	:	public ConverterTraitsEnumBase<char, lib3d::material::Material::BlendFunc, lib3d::material::Material::BlendFuncNames>
{};

} // namespace converter
*/
} // namespace liba
using namespace liba;

#endif //MATERIAL_H

